{extend name="Teacher/nav"} 
{block name="title"}教师课表{/block} 
{block name="content"}
<div class="container">
    <div class="row todayTime">
        <div class="col-md-12"><h2>现在时间:{$todayWeek->name}第{$todayWeek->getWeekorder()}周</h2></div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="currentTime">当前位置:{$currentSemester->name}->第{$currentWeekorder}周</div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <form action="{:url('index')}" method="get" class="form-inline">
                <div class="row">
                    <div class="col-md-5">
                        <label>学期:</label>
                        <select class="form-control" name="semester_id">
                            {volist name="allSemester" id="semester"}
                                <option value="{$semester->id}" {eq name="$semester->id" value="$currentSemester->id"} selected="selected"{/eq}>{$semester->name}</option>
                            {/volist}
                        </select>
                    </div>
                    <div class="col-md-5">
                        <label>周次：</label>
                        <select class="form-control" name="weekorder">
                            {for start="1" end="$currentSemester->totalweek+1" }
                                <option value="{$i}" {eq name="$i" value="$currentWeekorder"} selected="selected" {/eq}>第{$i}周</option>
                            {/for}
                        </select>
                    </div>
                    <div class="col-md-2">
                        <button type="submit" class="btn btn-default">搜索</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="row">
        <!-- 表格 -->
        <div class="col-md-12">
            <!-- 显示信息表格 -->
            <!-- 表格 -->
            <table class="table table-hover table-bordered">
                <tr class="info">
                    <th class="textCenter">星期/节次</th>
                    <th class="firstTd">星期一</th>
                    <th class="firstTd">星期二</th>
                    <th class="firstTd">星期三</th>
                    <th class="firstTd">星期四</th>
                    <th class="firstTd">星期五</th>
                    <th class="firstTd">星期六</th>
                    <th class="firstTd">星期日</th>
                </tr>
                {volist name="secheduleList" id="sechedules" key="key"}
                    <tr>
                        <td class="tableTd">第{$key}节</td>
                        {volist name="sechedules" id="sechedule"}
                            <td class="tableTd">
                                {eq name="sechedule" value="$null"}
                                    <span>无课</span>
                                {else/}
                                    <span>课程:{$sechedule->course->name}</span>
                                    <br>
                                    <span>教室:{$sechedule->classroom->name}</span>
                                    <br>
                                    <span>班级:</span>
                                    {volist name="Klasses" id="Klass"}
                                        {eq name="$sechedule->getKlassesIsChecked($Klass)" value="true"}<span>{$Klass->name}</span>{else/}{/eq}
                                    {/volist}     
                                {/eq}
                            </td>
                        {/volist}
                    </tr>
                {/volist}
            </table>
        </div>
    </div>
</div>

{/block}